package com.flea.service.search;

import com.flea.model.Product;
import com.flea.service.ISearchService;
import com.flea.service.ProductService;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class StandardSearch implements ISearchService {

    @Resource
    private ProductService productService;

    @Override
    public Page<Product> searchProducts(String key, Pageable pageable) {
        return productService.search(key, pageable);
    }
}
